﻿using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace ParkManagement.EntityFrameworkCore
{
    /// <summary>
    /// 停哪儿管理数据上下文类
    /// </summary>
    [ConnectionStringName("ParkManagement")]
    public class ParkManagementDbContext : AbpDbContext<ParkManagementDbContext>, IParkManagementDbContext
    {
        public DbSet<Correct> Corrects { get; set; }


        public DbSet<Lot> Lots { get; set; }
        public DbSet<Record> Records { get; set; }


        public DbSet<Car> Cars { get; set; }
        public DbSet<Consumption> Consumptions { get; set; }
        public DbSet<Move> Moves { get; set; }

        public ParkManagementDbContext(DbContextOptions<ParkManagementDbContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            builder.ConfigureParkManagement();
        }
    }
}